﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<%@ Register src="~/Menu.ascx" tagname="Menu" tagprefix="GMAO" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>GMAO</title>
    <link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
    <ext:ScriptContainer ID="Container" runat="server"/>
    <script type="text/javascript">
        function addTab(tabPanel, id, url, title) {
            var tab = tabPanel.getComponent(id);
            if (!tab) {
                tab = tabPanel.add({ 
                    id: id, 
                    title: title, 
                    closable:true,                    
                    autoLoad: {
                        showMask: true,
                        url: url,
                        mode:'iframe',
                        maskMsg: 'Loading ' + url + '...'
                    }                    
                });

                tab.on('activate', function() {
                /*
                    var item = MenuPanel1.menu.items.get(id + "_item");
                    if (item) {
                        MenuPanel1.setSelection(item);
                    }
*/
                }, this);
            }
            tabPanel.setActiveTab(tab);
        }
    </script>
</head>
<body>
    <form id="GMAO" runat="server">
        <ext:ScriptManager ID="SMGMAO" runat="server" ScriptMode="Debug" />
        <ext:ViewPort ID="MainWindow" runat="server">
            <Body>
                <ext:BorderLayout ID="BLMainWindow" runat="server">
                    <North>
                        <ext:Panel ID="Menu" runat="server" Height="50" Frame="true">
                            <Body>
                                KRISTOU
                            </Body>
                        </ext:Panel>
                    </North>
                    <West MinWidth="225" MaxWidth="400" Split="true" Collapsible="false">
                        <ext:Panel ID="MenuPrincipale" runat="server" Width="225">
                            <Body>
                                <GMAO:Menu ID="MenuDeGauche" runat="server"/>
                            </Body>
                        </ext:Panel>
                    </West>
                    <Center>
                        <ext:TabPanel ID="CenterPanel" runat="server">
                            <Tabs>
                                <ext:Tab ID="CenterTab1" runat="server" Title="Center" Border="false" BodyStyle="padding:6px;"
                                    Html="<h1>ViewPort with BorderLayout</h1>" />
                            </Tabs>
                        </ext:TabPanel>
                    </Center>
                    <South>
                        <ext:Panel ID="INDICATEUR" runat="server" Height="75" Frame="true">
                            <AutoLoad ShowMask="true" Url="" MaskMsg="loading" Mode="IFrame" />
                        </ext:Panel>
                    </South>
                </ext:BorderLayout>
            </Body>
        </ext:ViewPort>
    </form>
</body>
</html>

